<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="java.util.List" %>
<%@ page import="oneroom.admin.oneroom.roomModel" %>
<%@ page import="oneroom.admin.code.codeModel" %>
<jsp:useBean id="dao" scope="page" class="oneroom.admin.oneroom.roomDao" />
<jsp:useBean id="codeDao" scope="page" class="oneroom.admin.code.codeDao" />
<%
	String redirectUrl = "";
	if (session.getAttribute("id") != null &&
			((String)session.getAttribute("id")).equals("") == false) {
	} else {
		redirectUrl = "/room/member/login.jsp";
		response.sendRedirect(redirectUrl);
	}
	
	String	grade	= (String)session.getAttribute("grade") == null ? "" : (String)session.getAttribute("grade");
		
	List subwayList = codeDao.getDtlList("001");// 지하철
	List heatingList = codeDao.getDtlList("300");// 난방 시설
	List airconditioningList = codeDao.getDtlList("301");// 냉방 시설
	List  university1List = codeDao.getDtlList("400");// 대학교 지역
	List  roomnumberList = codeDao.getDtlList("500");// 매물 종류
	List  furnitureList = codeDao.getDtlList("302");// 가구
	List  appliancesList = codeDao.getDtlList("303");//가전
	List  kitchenList = codeDao.getDtlList("304"); //주방
	List  securityList = codeDao.getDtlList("305"); //무료
	//List  facilityList = codeDao.getDtlList("306"); //주변시설
	
	//기본 세트 값 시작
	String searchGubn = request.getParameter("searchGubn") 			== null ? "" : request.getParameter("searchGubn");
	String searchValue = request.getParameter("searchValue") 		== null ? "" : request.getParameter("searchValue");
	String giSelectPage = request.getParameter("txtSelectPage") 	== null ? "" : request.getParameter("txtSelectPage");
	String giSelectBlock = request.getParameter("txtSelectBlock") 	== null ? "" : request.getParameter("txtSelectBlock");
	//기본 세트 값 끝

	String oneroom_seq = request.getParameter("oneroom_seq") == null ? "" : request.getParameter("oneroom_seq");
	roomModel model = dao.getView(oneroom_seq);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>원룸몬스터</title>

<link href="/room/css/all.css" rel="stylesheet" type="text/css" />
<script src="/room/script/swfobject_modified.js" type="text/javascript"></script>
<script src="/room/script/common.js" type="text/javascript"></script>
<script src="/room/script/jquery-1.3.2.min.js" type="text/javascript" ></script>
<script type="text/javascript">
<!--
$(document).ready(function(){
	$.ajax({type : "post",
		url : "/room/common/subway.jsp",
		dataType : "html",
		data : "maincode=<%=model.getSubway1()%>&dtlcode=<%=model.getSubway2()%>",
		success : function(msg){
			document.getElementById("divSubWay2").innerHTML = msg;
		}
	});
	$.ajax({type : "post",
		url : "/room/common/university2.jsp",
		dataType : "html",
		data : "maincode=<%=model.getUniversity1()%>&dtlcode=<%=model.getUniversity2()%>",
		success : function(msg){
			document.getElementById("divuniversity2").innerHTML = msg;
		}
	});
	$('#subway1').change(function() {
		$.ajax({type : "post",
			url : "/room/common/subway.jsp",
			dataType : "html",
			data : "maincode="+document.getElementById("subway1").value,
			success : function(msg){
				document.getElementById("divSubWay2").innerHTML = msg;
			}
		});
	});
	$('#university1').change(function() {
		$.ajax({type : "post",
			url : "/room/common/university2.jsp",
			dataType : "html",
			data : "maincode="+document.getElementById("university1").value,
			success : function(msg){
				document.getElementById("divuniversity2").innerHTML = msg;
			}
		});
	});
	$('#btList').click(function() {
		window.location.href="room_list.jsp";
	});
	$('#zip_code').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#address1').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#address2').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#address3').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#address4').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#address5').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#zipcode1').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
	$('#zipcode2').click(function() {
		window.open('/room/common/zipcode.jsp', 'zipcode','scrollbars=yes, height=400px,width=440px');
	});
});
function display(no){
    for(var i=1; i<=2; i++){
        document.getElementById("charter_type"+i).style.display="none";
    }
    document.getElementById("charter_type"+no).style.display="block";
    if(no == "2"){
    	document.getElementById("charter_name").innerHTML = "월세";
    }else{
    	document.getElementById("charter_name").innerHTML = "전세";
    }
}

function goWrite(){
	var frm = document.frm;
	frm.content.value = edit_frame.EditorCtrl.document.body.innerHTML;	
	frm.submit();
}
//-->
</script>	
</head>
<body onload="display('<%=model.getCharter().equals("J") ? "1":"2"%>');">
<div align="center"> 

 <div id="content">

<!----------------왼쪽---------------->  
<%@ include file="/room/common/left.jsp" %>
<!----------------왼쪽끝---------------->  


<!----------------가운데 시작----------------> 
 <div id="rgt">
  <div id="con01">
   <div class="top bb1"><img src="/room/img/txt_top.gif" /></div>
   <div id="sch-adress"></div>
   
<div class="list">
 <div class="pb10"><img src="/room/img/line_blue.gif" width="32" height="2" /></div>
      <div class="pb20"><span style="font-size:11px;">Home >회원> <span style="color:#000;">마이페이지</span></span></div>
      <div> 
       <div class="tit">my 매물리스트 </div>   	
      </div>
      
     <!---------------- 내용시작----------------> 
				<form action="room_dbx.jsp" name="frm" id="frm" method="post" enctype="multipart/form-data"> 
				<input type="hidden" name="gubun" value="U" />
				<input type="hidden" name="oneroom_seq" value="<%=oneroom_seq %>"/>
				<input type="hidden" name="content" />					
				<!-- 실제적인 리스트 시작 -->
				<div class="list">
				<table  width="167" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				    <td><p class="btn_b87" id="tap03">기본정보</p></td>
				  </tr>
				</table>				
				<table width="565" border="0" cellspacing="0" cellpadding="0">
				<col width="15%" />
				<col width="40%" />
				<col width="15%" />
				<col width="30%" />
				  <tr>
				    <td class="ac fw bt2 bb1 h30 bg_g">주소</td>
				    <td colspan="3" class="bt2 bb1 h30 pl10 ">
					<input name="address1" id="address1" value="<%=model.getAddress1() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
					<input name="address2" id="address2" value="<%=model.getAddress2() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
					<input name="address3" id="address3" value="<%=model.getAddress3() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
					<input name="address4" id="address4" value="<%=model.getAddress4() %>" title="주소 입력" type="text"  style="width:40px;"  readonly="readonly" />
					<input name="address5" id="address5" value="<%=model.getAddress5() %>" title="주소 입력" type="text"  style="width:200px;"  readonly="readonly" />
					<input type="hidden" name="zipcode1" id="zipcode1">
					<input type="hidden" name="zipcode2" id="zipcode2">					
					<!-- 
				    <td class="ac fw bt2 bb1 h30 bg_g">우편번호</td>
				    <td class="bt2 bb1 h30 pl10 ">
					<input name="zipcode1" id="zipcode1" value="<%//=model.getZipcode1() %>" title="주소 입력" type="text"  style="width:30px;"  readonly="readonly" />
					~ <input name="zipcode2" id="zipcode2" value="<%//=model.getZipcode2() %>" title="주소 입력" type="text"  style="width:30px;"  readonly="readonly" />
					<a class="d" href="#" id="zip_code"><div class="btn_b67">주소검색</div></a>
					</td> -->					
				    </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">방수</td>
				    <td class=" bb1 h30 pl10">
					<select name="roomnumber" style="width:50px;">
						<option value="1" <%if(model.getRoomnumber().equals("1")){out.print(" selected='selected'");} %> >1</option>
						<option value="2" <%if(model.getRoomnumber().equals("2")){out.print(" selected='selected'");} %> >2</option>
						<option value="3" <%if(model.getRoomnumber().equals("3")){out.print(" selected='selected'");} %> >3</option>
						<option value="4" <%if(model.getRoomnumber().equals("4")){out.print(" selected='selected'");} %> >4</option>
						<option value="5" <%if(model.getRoomnumber().equals("5")){out.print(" selected='selected'");} %> >5</option>
						<option value="6" <%if(model.getRoomnumber().equals("6")){out.print(" selected='selected'");} %> >6</option>
						<option value="7" <%if(model.getRoomnumber().equals("7")){out.print(" selected='selected'");} %> >7</option>
						<option value="8" <%if(model.getRoomnumber().equals("8")){out.print(" selected='selected'");} %> >8</option>
						<option value="9" <%if(model.getRoomnumber().equals("9")){out.print(" selected='selected'");} %> >9</option>
						<option value="10" <%if(model.getRoomnumber().equals("10")){out.print(" selected='selected'");} %> >10</option>
					</select> 개				    
					</td>
				     <td class="ac fw bb1 h30 bg_g">매물종류</td>
				    <td class="ac bb1"  style="text-align: left;padding:5px;">
					<%
						for(int i = 0; i < roomnumberList.size(); i++){
							codeModel mode = (codeModel)roomnumberList.get(i);
					%>
					<input type="radio" name="roomkind" value="<%=mode.getCode() %>" <%if(mode.getCode().equals(model.getRoomkind())){ %>checked="checked" <%} %>/> <%=mode.getCodename() %>
					<%if(((i+1)%2) == 0 && i > 0) {%>
					<br/>
					<%} %>									
					<%
						}
					%>				    
					</td>
				  </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">평수</td>
				    <td class=" bb1 h30 pl10">
					<input name="roomarea" id="roomarea" value="<%=model.getRoomarea() %>" title="평수" type="text"  style="width:50px;" /> 평
					</td>
				    <td class="ac fw bb1 h30 bg_g">임대형태</td>
				    <td class="bb1 h30 pl10">
				    <input type="radio" name="charter" value="J" <%if(model.getCharter().equals("J")){%>checked="checked"<%} %> onclick="display('1');"/>전세 
					<input type="radio" name="charter" value="W" <%if(model.getCharter().equals("W")){%>checked="checked"<%} %> onclick="display('2');"/>월세
					</td>					
				  </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">층</td>
				    <td class=" bb1 h30 pl10">
								<select name="roomfloor1" style="width:50px;">
									<option value="1" <%if(model.getRoomfloor1().equals("1")){out.print(" selected='selected' ");} %>>1층</option>
									<option value="2" <%if(model.getRoomfloor1().equals("2")){out.print(" selected='selected' ");} %>>2층</option>
									<option value="3" <%if(model.getRoomfloor1().equals("3")){out.print(" selected='selected' ");} %>>3층</option>
									<option value="4" <%if(model.getRoomfloor1().equals("4")){out.print(" selected='selected' ");} %>>4층</option>
									<option value="5" <%if(model.getRoomfloor1().equals("5")){out.print(" selected='selected' ");} %>>5층</option>
									<option value="6" <%if(model.getRoomfloor1().equals("6")){out.print(" selected='selected' ");} %>>6층</option>
									<option value="7" <%if(model.getRoomfloor1().equals("7")){out.print(" selected='selected' ");} %>>7층</option>
									<option value="8" <%if(model.getRoomfloor1().equals("8")){out.print(" selected='selected' ");} %>>8층</option>
									<option value="9" <%if(model.getRoomfloor1().equals("9")){out.print(" selected='selected' ");} %>>9층</option>
									<option value="10" <%if(model.getRoomfloor1().equals("10")){out.print(" selected='selected' ");} %>>10층</option>
									<option value="11" <%if(model.getRoomfloor1().equals("11")){out.print(" selected='selected' ");} %>>11층</option>
									<option value="12" <%if(model.getRoomfloor1().equals("12")){out.print(" selected='selected' ");} %>>12층</option>
									<option value="13" <%if(model.getRoomfloor1().equals("13")){out.print(" selected='selected' ");} %>>13층</option>
									<option value="14" <%if(model.getRoomfloor1().equals("14")){out.print(" selected='selected' ");} %>>14층</option>
									<option value="15" <%if(model.getRoomfloor1().equals("15")){out.print(" selected='selected' ");} %>>15층</option>
									<option value="16" <%if(model.getRoomfloor1().equals("16")){out.print(" selected='selected' ");} %>>16층</option>
									<option value="17" <%if(model.getRoomfloor1().equals("17")){out.print(" selected='selected' ");} %>>17층</option>
									<option value="18" <%if(model.getRoomfloor1().equals("18")){out.print(" selected='selected' ");} %>>18층</option>
									<option value="19" <%if(model.getRoomfloor1().equals("19")){out.print(" selected='selected' ");} %>>19층</option>
									<option value="20" <%if(model.getRoomfloor1().equals("20")){out.print(" selected='selected' ");} %>>20층</option>
									<option value="21" <%if(model.getRoomfloor1().equals("21")){out.print(" selected='selected' ");} %>>21층</option>
									<option value="22" <%if(model.getRoomfloor1().equals("22")){out.print(" selected='selected' ");} %>>22층</option>
									<option value="23" <%if(model.getRoomfloor1().equals("23")){out.print(" selected='selected' ");} %>>23층</option>
									<option value="24" <%if(model.getRoomfloor1().equals("24")){out.print(" selected='selected' ");} %>>24층</option>
									<option value="25" <%if(model.getRoomfloor1().equals("25")){out.print(" selected='selected' ");} %>>25층</option>
									<option value="26" <%if(model.getRoomfloor1().equals("26")){out.print(" selected='selected' ");} %>>26층</option>
									<option value="27" <%if(model.getRoomfloor1().equals("27")){out.print(" selected='selected' ");} %>>27층</option>
									<option value="28" <%if(model.getRoomfloor1().equals("28")){out.print(" selected='selected' ");} %>>28층</option>
									<option value="29" <%if(model.getRoomfloor1().equals("29")){out.print(" selected='selected' ");} %>>29층</option>
									<option value="30" <%if(model.getRoomfloor1().equals("30")){out.print(" selected='selected' ");} %>>30층</option>
									<option value="31" <%if(model.getRoomfloor1().equals("31")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="32" <%if(model.getRoomfloor1().equals("32")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="33" <%if(model.getRoomfloor1().equals("33")){out.print(" selected='selected' ");} %>>32층</option>
									<option value="34" <%if(model.getRoomfloor1().equals("34")){out.print(" selected='selected' ");} %>>33층</option>
									<option value="35" <%if(model.getRoomfloor1().equals("35")){out.print(" selected='selected' ");} %>>34층</option>
									<option value="36" <%if(model.getRoomfloor1().equals("36")){out.print(" selected='selected' ");} %>>35층</option>
									<option value="37" <%if(model.getRoomfloor1().equals("37")){out.print(" selected='selected' ");} %>>36층</option>
									<option value="38" <%if(model.getRoomfloor1().equals("38")){out.print(" selected='selected' ");} %>>37층</option>
									<option value="39" <%if(model.getRoomfloor1().equals("39")){out.print(" selected='selected' ");} %>>38층</option>
									<option value="40" <%if(model.getRoomfloor1().equals("40")){out.print(" selected='selected' ");} %>>39층</option>
								</select> / 
								<select name="roomfloor2" style="width:50px;">
									<option value="1" <%if(model.getRoomfloor2().equals("1")){out.print(" selected='selected' ");} %>>1층</option>
									<option value="2" <%if(model.getRoomfloor2().equals("2")){out.print(" selected='selected' ");} %>>2층</option>
									<option value="3" <%if(model.getRoomfloor2().equals("3")){out.print(" selected='selected' ");} %>>3층</option>
									<option value="4" <%if(model.getRoomfloor2().equals("4")){out.print(" selected='selected' ");} %>>4층</option>
									<option value="5" <%if(model.getRoomfloor2().equals("5")){out.print(" selected='selected' ");} %>>5층</option>
									<option value="6" <%if(model.getRoomfloor2().equals("6")){out.print(" selected='selected' ");} %>>6층</option>
									<option value="7" <%if(model.getRoomfloor2().equals("7")){out.print(" selected='selected' ");} %>>7층</option>
									<option value="8" <%if(model.getRoomfloor2().equals("8")){out.print(" selected='selected' ");} %>>8층</option>
									<option value="9" <%if(model.getRoomfloor2().equals("9")){out.print(" selected='selected' ");} %>>9층</option>
									<option value="10" <%if(model.getRoomfloor2().equals("10")){out.print(" selected='selected' ");} %>>10층</option>
									<option value="11" <%if(model.getRoomfloor2().equals("11")){out.print(" selected='selected' ");} %>>11층</option>
									<option value="12" <%if(model.getRoomfloor2().equals("12")){out.print(" selected='selected' ");} %>>12층</option>
									<option value="13" <%if(model.getRoomfloor2().equals("13")){out.print(" selected='selected' ");} %>>13층</option>
									<option value="14" <%if(model.getRoomfloor2().equals("14")){out.print(" selected='selected' ");} %>>14층</option>
									<option value="15" <%if(model.getRoomfloor2().equals("15")){out.print(" selected='selected' ");} %>>15층</option>
									<option value="16" <%if(model.getRoomfloor2().equals("16")){out.print(" selected='selected' ");} %>>16층</option>
									<option value="17" <%if(model.getRoomfloor2().equals("17")){out.print(" selected='selected' ");} %>>17층</option>
									<option value="18" <%if(model.getRoomfloor2().equals("18")){out.print(" selected='selected' ");} %>>18층</option>
									<option value="19" <%if(model.getRoomfloor2().equals("19")){out.print(" selected='selected' ");} %>>19층</option>
									<option value="20" <%if(model.getRoomfloor2().equals("20")){out.print(" selected='selected' ");} %>>20층</option>
									<option value="21" <%if(model.getRoomfloor2().equals("21")){out.print(" selected='selected' ");} %>>21층</option>
									<option value="22" <%if(model.getRoomfloor2().equals("22")){out.print(" selected='selected' ");} %>>22층</option>
									<option value="23" <%if(model.getRoomfloor2().equals("23")){out.print(" selected='selected' ");} %>>23층</option>
									<option value="24" <%if(model.getRoomfloor2().equals("24")){out.print(" selected='selected' ");} %>>24층</option>
									<option value="25" <%if(model.getRoomfloor2().equals("25")){out.print(" selected='selected' ");} %>>25층</option>
									<option value="26" <%if(model.getRoomfloor2().equals("26")){out.print(" selected='selected' ");} %>>26층</option>
									<option value="27" <%if(model.getRoomfloor2().equals("27")){out.print(" selected='selected' ");} %>>27층</option>
									<option value="28" <%if(model.getRoomfloor2().equals("28")){out.print(" selected='selected' ");} %>>28층</option>
									<option value="29" <%if(model.getRoomfloor2().equals("29")){out.print(" selected='selected' ");} %>>29층</option>
									<option value="30" <%if(model.getRoomfloor2().equals("30")){out.print(" selected='selected' ");} %>>30층</option>
									<option value="31" <%if(model.getRoomfloor2().equals("31")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="32" <%if(model.getRoomfloor2().equals("32")){out.print(" selected='selected' ");} %>>31층</option>
									<option value="33" <%if(model.getRoomfloor2().equals("33")){out.print(" selected='selected' ");} %>>32층</option>
									<option value="34" <%if(model.getRoomfloor2().equals("34")){out.print(" selected='selected' ");} %>>33층</option>
									<option value="35" <%if(model.getRoomfloor2().equals("35")){out.print(" selected='selected' ");} %>>34층</option>
									<option value="36" <%if(model.getRoomfloor2().equals("36")){out.print(" selected='selected' ");} %>>35층</option>
									<option value="37" <%if(model.getRoomfloor2().equals("37")){out.print(" selected='selected' ");} %>>36층</option>
									<option value="38" <%if(model.getRoomfloor2().equals("38")){out.print(" selected='selected' ");} %>>37층</option>
									<option value="39" <%if(model.getRoomfloor2().equals("39")){out.print(" selected='selected' ");} %>>38층</option>
									<option value="40" <%if(model.getRoomfloor2().equals("40")){out.print(" selected='selected' ");} %>>39층</option>
								</select>
					</td>
				    <td class="ac fw bb1 h30 bg_g"><span id="charter_name"><%if(model.getCharter().equals("J")){%>전세<%}else{ %>월세<%} %></span></td>
				    <td class="bb1 h30  pl10">
					<div id="charter_type1"  style="display: none;">
					<input name="roommoney" id="roommoney" value="<%=model.getRoommoney() %>" title="전세금" type="text"  style="width:50px;" /> 만원
					</div>
					<div id="charter_type2"  style="display: none;">
					보증 : <input name="roommonth1" id="roommonth1" value="<%=model.getRoommonth1() %>" title="월세 보증금" type="text"  style="width:50px;" /> 만원 /<br/> 
					월세 : <input name="roommonth2" id="roommonth2" value="<%=model.getRoommonth2() %>" title="월세금" type="text"  style="width:50px;" /> 만원
					</div>					
					</td>					
				  </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">주차</td>
				    <td class=" bb1 h30 pl10">
					<select name="car" style="width:50px;">
						<option value="1" <%if(model.getCar().equals("1")){out.print(" selected='selected' ");} %>>1</option>
						<option value="2" <%if(model.getCar().equals("2")){out.print(" selected='selected' ");} %>>2</option>
						<option value="3" <%if(model.getCar().equals("3")){out.print(" selected='selected' ");} %>>3</option>
						<option value="4" <%if(model.getCar().equals("4")){out.print(" selected='selected' ");} %>>4</option>
						<option value="5" <%if(model.getCar().equals("5")){out.print(" selected='selected' ");} %>>5</option>
						<option value="6" <%if(model.getCar().equals("6")){out.print(" selected='selected' ");} %>>6</option>
						<option value="7" <%if(model.getCar().equals("7")){out.print(" selected='selected' ");} %>>7</option>
						<option value="8" <%if(model.getCar().equals("8")){out.print(" selected='selected' ");} %>>8</option>
						<option value="9" <%if(model.getCar().equals("9")){out.print(" selected='selected' ");} %>>9</option>
						<option value="10" <%if(model.getCar().equals("10")){out.print(" selected='selected' ");} %>>10</option>
					</select> 대
					</td>
				    <td class="ac fw bb1 h30 bg_g">관리비</td>
				    <td class="bb1 h30 pl10 ">
					<input name="managemoney" id="managemoney" value="<%=model.getManagemoney() %>" title="관리비" type="text"  style="width:80px;" /> 만원
					</td>				    
				  </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">거래방식</td>
				    <td colspan="3" class="bb1 h30 pl10 ">
					<select name="roomoption" id="roomoption" style="width:80px;">
						<option value="">선택</option>
						<option value="G" <%if(model.getRoomoption().equals("G")){%>selected="selected"<%} %>>일반중개</option>
						<option value="M" <%if(model.getRoomoption().equals("M")){%>selected="selected"<%} %>>반값중개</option>
						<option value="D" <%if(model.getRoomoption().equals("D")){%>selected="selected"<%} %>>직거래</option>			
					</select>
				  </tr>					  
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">지하철</td>
				    <td colspan="3" class="bb1 h30 pl10 ">
					<select name="subway1" id="subway1" style="width:80px;">
					<%
						for(int i = 0; i < subwayList.size(); i++){
							codeModel mode = (codeModel)subwayList.get(i);
					%>
					<option value="<%=mode.getCode() %>" <%if(mode.getCode().equals(model.getSubway1())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
					<%
						}
					%>
					</select>
					&nbsp;
					<span id="divSubWay2">
					<select name="subway2" style="width:80px;">
						<option value="선택">선택</option>
					</select>
					</span>
					&nbsp;
					<select name="subway3" style="width:80px;">
						<option value="">선택</option>					
						<option value="5" <%if(model.getSubway3().equals("5분거리")){out.print(" selected='selected' ");} %> >5분거리</option>
						<option value="10" <%if(model.getSubway3().equals("10분거리")){out.print(" selected='selected' ");} %> >10분거리</option>
						<option value="15" <%if(model.getSubway3().equals("15분거리")){out.print(" selected='selected' ");} %> >15분거리</option>
						<option value="20" <%if(model.getSubway3().equals("20분거리")){out.print(" selected='selected' ");} %> >20분거리</option>
						<option value="25" <%if(model.getSubway3().equals("25분거리")){out.print(" selected='selected' ");} %> >25분거리</option>
						<option value="30" <%if(model.getSubway3().equals("30분거리")){out.print(" selected='selected' ");} %> >30분거리</option>
						<option value="35" <%if(model.getSubway3().equals("35분거리")){out.print(" selected='selected' ");} %> >35분거리</option>
						<option value="40" <%if(model.getSubway3().equals("40분거리")){out.print(" selected='selected' ");} %> >40분거리</option>
						<option value="45" <%if(model.getSubway3().equals("45분거리")){out.print(" selected='selected' ");} %> >45분거리</option>
					</select>				    
				  </tr>				  
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">대학교</td>
				    <td class="bb1 h30 pl10 ">
					<select name="university1" id="university1" style="width:80px;">
					<%
						for(int i = 0; i < university1List.size(); i++){
							codeModel mode = (codeModel)university1List.get(i);
					%>
					<option value="<%=mode.getCode() %>" <%if(model.getUniversity1().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
					<%
						}
					%>	
					</select>
					<span id="divuniversity2">
					<select name="university2" id="divuniversity2" style="width:80px;">
						<option value="선택">선택</option>
					</select>
					</span>
					</td>
				    <td class="ac fw bb1 h30 bg_g">입주가능일</td>
				    <td class="bb1 h30 pl10 ">
					<input type="radio" name="lease" value="즉시입주" <%if(model.getLease().equals("즉시입주")){out.print(" checked='checked' ");} %>/>즉시입주 <br />
					<input type="radio" name="lease" value="입주가능일 지정" <%if(model.getLease().equals("입주가능일 지정")){out.print(" checked='checked' ");} %>/>입주가능일 지정<br />
					<select name="leaseyear" style="width:60px;">
						<option value="2012" <%if(model.getLeaseyear().equals("2012")){out.print(" selected='selected' ");} %>>2012</option>
						<option value="2011" <%if(model.getLeaseyear().equals("2011")){out.print(" selected='selected' ");} %>>2011</option>
						<option value="2010" <%if(model.getLeaseyear().equals("2010")){out.print(" selected='selected' ");} %>>2010</option>
						<option value="2009" <%if(model.getLeaseyear().equals("2009")){out.print(" selected='selected' ");} %>>2009</option>
						<option value="2008" <%if(model.getLeaseyear().equals("2008")){out.print(" selected='selected' ");} %>>2008</option>
					</select>
					<select name="leasemonth" style="width:40px;">
						<option value="12" <%if(model.getLeasemonth().equals("12")){out.print(" selected='selected' ");} %>>12</option>
						<option value="11" <%if(model.getLeasemonth().equals("11")){out.print(" selected='selected' ");} %>>11</option>
						<option value="10" <%if(model.getLeasemonth().equals("10")){out.print(" selected='selected' ");} %>>10</option>
						<option value="9" <%if(model.getLeasemonth().equals("9")){out.print(" selected='selected' ");} %>>9</option>
						<option value="8" <%if(model.getLeasemonth().equals("8")){out.print(" selected='selected' ");} %>>8</option>
						<option value="7" <%if(model.getLeasemonth().equals("7")){out.print(" selected='selected' ");} %>>7</option>
						<option value="6" <%if(model.getLeasemonth().equals("6")){out.print(" selected='selected' ");} %>>6</option>
						<option value="5" <%if(model.getLeasemonth().equals("5")){out.print(" selected='selected' ");} %>>5</option>
						<option value="4" <%if(model.getLeasemonth().equals("4")){out.print(" selected='selected' ");} %>>4</option>
						<option value="3" <%if(model.getLeasemonth().equals("3")){out.print(" selected='selected' ");} %>>3</option>
						<option value="2" <%if(model.getLeasemonth().equals("2")){out.print(" selected='selected' ");} %>>2</option>
						<option value="1" <%if(model.getLeasemonth().equals("1")){out.print(" selected='selected' ");} %>>1</option>
					</select>
					<select name="leaseday" style="width:40px;">
						<option value="31" <%if(model.getLeaseday().equals("31")){out.print(" selected='selected' ");} %>>31</option>
						<option value="30" <%if(model.getLeaseday().equals("30")){out.print(" selected='selected' ");} %>>30</option>
						<option value="29" <%if(model.getLeaseday().equals("29")){out.print(" selected='selected' ");} %>>29</option>
						<option value="28" <%if(model.getLeaseday().equals("28")){out.print(" selected='selected' ");} %>>28</option>
						<option value="27" <%if(model.getLeaseday().equals("27")){out.print(" selected='selected' ");} %>>27</option>
						<option value="26" <%if(model.getLeaseday().equals("26")){out.print(" selected='selected' ");} %>>26</option>
						<option value="25" <%if(model.getLeaseday().equals("25")){out.print(" selected='selected' ");} %>>25</option>
						<option value="24" <%if(model.getLeaseday().equals("24")){out.print(" selected='selected' ");} %>>24</option>
						<option value="23" <%if(model.getLeaseday().equals("23")){out.print(" selected='selected' ");} %>>23</option>
						<option value="22" <%if(model.getLeaseday().equals("22")){out.print(" selected='selected' ");} %>>22</option>
						<option value="21" <%if(model.getLeaseday().equals("21")){out.print(" selected='selected' ");} %>>21</option>
						<option value="20" <%if(model.getLeaseday().equals("20")){out.print(" selected='selected' ");} %>>20</option>
						<option value="19" <%if(model.getLeaseday().equals("19")){out.print(" selected='selected' ");} %>>19</option>
						<option value="18" <%if(model.getLeaseday().equals("18")){out.print(" selected='selected' ");} %>>18</option>
						<option value="17" <%if(model.getLeaseday().equals("17")){out.print(" selected='selected' ");} %>>17</option>
						<option value="16" <%if(model.getLeaseday().equals("16")){out.print(" selected='selected' ");} %>>16</option>
						<option value="15" <%if(model.getLeaseday().equals("15")){out.print(" selected='selected' ");} %>>15</option>
						<option value="14" <%if(model.getLeaseday().equals("14")){out.print(" selected='selected' ");} %>>14</option>
						<option value="13" <%if(model.getLeaseday().equals("13")){out.print(" selected='selected' ");} %>>13</option>
						<option value="12" <%if(model.getLeaseday().equals("12")){out.print(" selected='selected' ");} %>>12</option>
						<option value="11" <%if(model.getLeaseday().equals("11")){out.print(" selected='selected' ");} %>>11</option>
						<option value="10" <%if(model.getLeaseday().equals("10")){out.print(" selected='selected' ");} %>>10</option>
						<option value="9" <%if(model.getLeaseday().equals("9")){out.print(" selected='selected' ");} %>>9</option>
						<option value="8" <%if(model.getLeaseday().equals("8")){out.print(" selected='selected' ");} %>>8</option>
						<option value="7" <%if(model.getLeaseday().equals("7")){out.print(" selected='selected' ");} %>>7</option>
						<option value="6" <%if(model.getLeaseday().equals("6")){out.print(" selected='selected' ");} %>>6</option>
						<option value="5" <%if(model.getLeaseday().equals("5")){out.print(" selected='selected' ");} %>>5</option>
						<option value="4" <%if(model.getLeaseday().equals("4")){out.print(" selected='selected' ");} %>>4</option>
						<option value="3" <%if(model.getLeaseday().equals("3")){out.print(" selected='selected' ");} %>>3</option>
						<option value="2" <%if(model.getLeaseday().equals("2")){out.print(" selected='selected' ");} %>>2</option>
						<option value="1" <%if(model.getLeaseday().equals("1")){out.print(" selected='selected' ");} %>>1</option>
					</select>
					</td>
				  </tr>				  
				</table>
				</div>			
					
				<br/>
				<div class="list">
				<table  width="167" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				    <td><p class="btn_b87" id="tap03">옵션정보</p></td>
				  </tr>
				</table> 				
				<table width="565" border="0" cellspacing="0" cellpadding="0">
				<col width="15%" />
				<col width="35%" />
				<col width="15%" />
				<col width="35%" />
				  <tr>
				     <td class="bt2 bb1 h30 pl10">▶ 난방시설 : 
						<select name="heating" style="width:120px;">
						<%
							for(int i = 0; i < heatingList.size(); i++){
								codeModel mode = (codeModel)heatingList.get(i);
						%>
							<option value="<%=mode.getCode() %>" <%if(model.getHeating().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
						<%
							}
						%>
						</select>
						&nbsp;&nbsp;&nbsp;▶ 냉방시설 : 
						<select name="airconditioning" style="width:120px;">
						<%
						for(int i = 0; i < airconditioningList.size(); i++){
							codeModel mode = (codeModel)airconditioningList.get(i);
						%>
							<option value="<%=mode.getCode() %>" <%if(model.getAirconditioning().equals(mode.getCode())){out.print(" selected='selected' ");} %>><%=mode.getCodename() %></option>					
						<%
						}
						%>
						</select>
						&nbsp;&nbsp;&nbsp;
					</td>
				  </tr>
				  <tr>
				     <td class="bb1 h30 pl10">▶ 가구 : 
					<%
						String[] furniture = model.getFurniture1().split(",");
						for(int i = 0; i < furnitureList.size(); i++){
							codeModel mode = (codeModel)furnitureList.get(i);
							String checked = "";
								for(int j = 0; j<furniture.length; j++){
									if(furniture[j].equals(mode.getCode())){
										checked = " checked='checked' ";
									}
								}
					%>
						<input type="checkbox" name="furniture1" id="furniture1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
					<%
						}
					%>	
					</td>
				  </tr>
				  <tr>
				     <td class="bb1 h30 pl10">▶ 가전 : 
					<%
						String[] appliances = model.getAppliances1().split(",");
						for(int i = 0; i < appliancesList.size(); i++){
							codeModel mode = (codeModel)appliancesList.get(i);
							String checked = "";
							for(int j = 0; j<appliances.length; j++){
								if(appliances[j].equals(mode.getCode())){
									checked = " checked='checked' ";
								}
							}
					%>
						<input type="checkbox" name="appliances1" id="appliances1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
					<%
						}
					%>				      
				     </td>
				  </tr>
				  <tr>
				     <td class="bb1 h30 pl10">▶ 주방/욕실 :  
					<%
						String[] kitchen = model.getKitchen1().split(",");
						for(int i = 0; i < kitchenList.size(); i++){
							codeModel mode = (codeModel)kitchenList.get(i);
							String checked = "";
							for(int j = 0; j<kitchen.length; j++){
								if(kitchen[j].equals(mode.getCode())){
									checked = " checked='checked' ";
								}
							}
					%>
						<input type="checkbox" name="kitchen1" id="kitchen1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
					<%
						}
					%>
				     </td>
				  </tr>
				  <tr>
				     <td class="bb1 h30 pl10">▶ 무료 :  
					<%
						String[] security = model.getSecurity1().split(",");
						for(int i = 0; i < securityList.size(); i++){
							codeModel mode = (codeModel)securityList.get(i);
							String checked = "";
							for(int j = 0; j<security.length; j++){
								if(security[j].equals(mode.getCode())){
									checked = " checked='checked' ";
								}
							}
					%>
						<input type="checkbox" name="security1" id="security1" value="<%=mode.getCode() %>" <%=checked %>/> <%=mode.getCodename() %>				
					<%
						}
					%>

					</td>
				  </tr>
				  <!-- tr>
				     <td class="bb1 h30 pl10">▶ 주변시설 :  
					<%
					//	String[] facility = model.getFacility1().split(",");
					//	for(int i = 0; i < facilityList.size(); i++){
					//		codeModel mode = (codeModel)facilityList.get(i);
					//		String checked = "";
					//		for(int j = 0; j<facility.length; j++){
					//			if(facility[j].equals(mode.getCode())){
					//				checked = " checked='checked' ";
					//			}
					//		}
					%>
						<input type="checkbox" name="facility1" id="facility1" value="<%//=mode.getCode() %>" <%//=checked %>/> <%//=mode.getCodename() %>				
					<%
					//	}
					%> 
					</td>
				  </tr> -->
				</table>
				</div>
				<br/>
				
				<div class="list">
				<table  width="167" border="0" cellspacing="0" cellpadding="0">
				  <tr>
				    <td><p class="btn_b87" id="tap03">소개</p></td>
				  </tr>
				</table> 				
				<table width="565" border="0" cellspacing="0" cellpadding="0">
				<col width="15%" />
				<col width="35%" />
				<col width="15%" />
				<col width="35%" />
				  <tr>
				    <td class="ac fw bt2 bb1 h30 bg_g">제목</td>
				    <td colspan="3" class="bt2 bb1 h30 pl10 ">
				    <input name="title" id="title" value="<%=model.getTitle() %>" title="제목" type="text"  style="width:300px;" maxlength="20" />
				    </tr>
				  <tr>
				    <td class="ac fw bb1 h30 bg_g">작성자</td>
				    <td class=" bb1 h30 pl10"><input name="person" id="person" value="<%=model.getPerson() %>" title="담당자" type="text"  style="width:80px;" /></td>
				     <td class="ac fw bb1 h30 bg_g">연락처</td>
				    <td class="ac bb1 h30"><input name="tel1" id="tel1" value="<%=model.getTel1() %>" title="연락처1" type="text"  style="width:25px;" maxlength="3"/> -
							<input name="tel2" id="tel2" value="<%=model.getTel2() %>" title="연락처2" type="text"  style="width:30px;" maxlength="4"/> - 
							<input name="tel3" id="tel3" value="<%=model.getTel3() %>" title="연락처3" type="text"  style="width:30px;" maxlength="4"/></td>
				  </tr>
				  <tr>
				     <td colspan="4" class="bb1 h30 pl10 lh pt10 pb10">
					<!-- textarea name="content" style="width:500px; height:300px;"></textarea> -->
						<iframe width="500px" height="376" id="edit_frame" name="edit_frame" scrolling="no" frameborder="0" marginheight="0" marginwidth="0" src="/editor/editor.htm"></iframe>
					<textarea rows="10" style="display:none;width:500px; height:300px;"  name="editorContents"><%=model.getContent()== null ? "" :model.getContent() %></textarea>  					
					</td>
				   </tr>				  
				</table>
				</div>
				<br/>	
				
				<div class="list">
				<div><img src="/room/img/tab_option.gif"  /><!-- 사진등록 --></div>
				<table width="565" border="0" cellspacing="0" cellpadding="0">
				<col width="50%" />
				<col width="50%" />
				  <tr>
				     <td class="bt2 bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto1_big().equals("")){ %><img src="/download/<%=model.getPhoto1_small() %>?name=<%=model.getPhoto1_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo1" id="photo1" style="width:265px;" /> <input type="radio" name="photo1_main" value="1" <%if(model.getPhoto1_main().equals("1")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto1"/> 삭제  
					<input type="hidden" name="photo1_path" value="<%=model.getPhoto1()%>"/>
					<input type="hidden" name="photo1_small" value="<%=model.getPhoto1_small()%>"/>
					<input type="hidden" name="photo1_big" value="<%=model.getPhoto1_big()%>"/>
					</td>
				     <td class="bt2 bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto2_big().equals("")){ %><img src="/download/<%=model.getPhoto2_small() %>?name=<%=model.getPhoto2_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo2" id="photo2" style="width:265px;" /> <input type="radio" name="photo1_main" value="2" <%if(model.getPhoto1_main().equals("2")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto2"/> 삭제  
					<input type="hidden" name="photo2_path" value="<%=model.getPhoto2()%>"/>
					<input type="hidden" name="photo2_small" value="<%=model.getPhoto2_small()%>"/>
					<input type="hidden" name="photo2_big" value="<%=model.getPhoto2_big()%>"/>				     
					</td>					
				  </tr>
				  <tr>
				     <td class="bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto3_small().equals("")){ %><img src="/download/<%=model.getPhoto3_small() %>?name=<%=model.getPhoto3_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo3" id="photo3" style="width:265px;" /> <input type="radio" name="photo1_main" value="3" <%if(model.getPhoto1_main().equals("3")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto3"/> 삭제  
					<input type="hidden" name="photo3_path" value="<%=model.getPhoto3()%>"/>
					<input type="hidden" name="photo3_small" value="<%=model.getPhoto3_small()%>"/>
					<input type="hidden" name="photo3_big" value="<%=model.getPhoto3_big()%>"/>
					</td>
				     <td class="bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto4_small().equals("")){ %><img src="/download/<%=model.getPhoto4_small() %>?name=<%=model.getPhoto4_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo4" id="photo4" style="width:265px;" /> <input type="radio" name="photo1_main" value="4" <%if(model.getPhoto1_main().equals("4")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto4"/> 삭제  
					<input type="hidden" name="photo4_path" value="<%=model.getPhoto4()%>"/>
					<input type="hidden" name="photo4_small" value="<%=model.getPhoto4_small()%>"/>
					<input type="hidden" name="photo4_big" value="<%=model.getPhoto4_big()%>"/>
					</td>
				  </tr>
				  <tr>				  
				     <td class="bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto5_small().equals("")){ %><img src="/download/<%=model.getPhoto5_small() %>?name=<%=model.getPhoto5_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo5" id="photo5" style="width:265px;" /> <input type="radio" name="photo1_main" value="5" <%if(model.getPhoto1_main().equals("5")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto5"/> 삭제  
					<input type="hidden" name="photo5_path" value="<%=model.getPhoto5()%>"/>
					<input type="hidden" name="photo5_small" value="<%=model.getPhoto5_small()%>"/>
					<input type="hidden" name="photo5_big" value="<%=model.getPhoto5_big()%>"/>
					</td>
				     <td class="bb1 h30 pl10">&nbsp;
					<%if(!model.getPhoto6_small().equals("")){ %><img src="/download/<%=model.getPhoto6_small() %>?name=<%=model.getPhoto6_small() %>&kind=img" /><%} %><br/>
					<input type="file" name="photo6" id="photo6" style="width:265px;" /> <input type="radio" name="photo1_main" value="6" <%if(model.getPhoto1_main().equals("6")){out.print(" checked='checked' ");} %>/> 메인<br/>
					<input type="checkbox" value="Y" name="delphoto6"/> 삭제  
					<input type="hidden" name="photo6_path" value="<%=model.getPhoto6()%>"/>
					<input type="hidden" name="photo6_small" value="<%=model.getPhoto6_small()%>"/>
					<input type="hidden" name="photo6_big" value="<%=model.getPhoto6_big()%>"/>
					</td>
				  </tr>				  
				</table>
				</div>
				<br/>	 

				<!-- 실제적인 리스트 끝 -->
			<table border="0" cellspacing="0" cellpadding="0">
			  <tr>
			    <td style="padding-left:10px;">
				  <a class="d" href="#"  onclick="goWrite();"><div class="btn_b47">수정</div></a>
				</td>
			    <td style="padding-left:10px;">
				  <a class="d" href="#" id="btList"><div class="btn_b47">목록</div></a>
				</td>
			  </tr>
			</table>				
				</form>
</div>
</div>
<!----------------오른쪽 시작---------------->  
<%@ include file="/room/common/right.jsp" %>  
<!----------------오른쪽 끝---------------->
</div>


<!-------------푸터영역----------> 
<%@ include file="/room/common/footer.jsp" %> 
<!-------------푸터영역----------> 
<script type="text/javascript">
swfobject.registerObject("FlashID");
</script>
</body>
</html>